// import React, { Component } from 'react';
// import {
//   Route,
//   Redirect,
//   withRouter
// } from "react-router-dom";

import { renderRoutes } from 'react-router-config';

export default props => renderRoutes(props.route.routes);
// class Root extends Component{
//     render(){
//       const { route, children } = this.props;
//       if (!route.auth) {
//         return <Route
//             location={prevLocation || location}
//             render={() => children}
//         />
//       }
//       return <Redirect to={{ pathname: '/login', state: { from: this.props.location } }} />
//     }
//   }
//   // 组件一定要用withRouter包一下,否则会导致路由url更新,但是组件不更新
//   export default withRouter(Root);
